<?php


class IndexController extends Zend_Controller_Action
{

    private function haySesion() {
        $salida = false;

        if (Zend_Session::namespaceIsset('spalm')){
            $session = new Zend_Session_Namespace('spalm');

            $salida = (isset ($session->usuario));
        }

        return $salida;
    }

    public function init()
    {
        /* Initialize action controller here */
    }

    public function indexAction()
    {
        $this->principalAction();
    }

    public function principalAction()
    {
        if (!$this->haySesion()){
            $this->_redirect('/index.php/usuario/login');
        }
    }


}



